/*
 * InGameState.h
 *
 *  Created on: 30.11.2009
 *      Author: Sergej Schmidt
 */

#ifndef INGAMESTATE_H_
#define INGAMESTATE_H_

#include <Ogre.h>
#include <OIS.h>
#include <MyGUI.h>

#include "GameState.h"
#include "InStrategieState.h"
#include "../TheGame.h"

class InGameState : public GameState
{
public:
	void enter();
	void exit();
	void pause();
	void resume();

	void keyPressed( const OIS::KeyEvent& e );
	void keyReleased( const OIS::KeyEvent& e );

    void mouseMoved( const OIS::MouseEvent &e );
    void mousePressed( const OIS::MouseEvent &e, OIS::MouseButtonID id );
    void mouseReleased( const OIS::MouseEvent &e, OIS::MouseButtonID id );

	bool frameStarted(const Ogre::FrameEvent& evt);
	bool frameEnded(const Ogre::FrameEvent& evt);

	static InGameState* getInstance() { return &m_pInGameState; }
protected:
	InGameState() {
	}

	Ogre::Root*			m_pRoot;
	Ogre::RenderWindow* m_pRenderWindow;
	Ogre::SceneManager* m_pSceneMgr;
	Ogre::Viewport*		m_pViewport;
	//InputManager*		m_pInputManager;
	Ogre::Camera* 		m_pCamera;
	// MyGUI
	MyGUI::Gui*			m_pGui;
	//
	TheGame*			m_pTheGame;

    string mResourceGroup;
    string mSchemeFilename;
    string mSchemeName;
    string mMouseName;
    string mFontFilename;
    string mFontName;

    string mRootLayoutFilename;

    Ogre::SceneNode*	m_pFountainNode;
    Ogre::SceneNode*	m_pTerrain;
    Ogre::Light*		m_pLight;
    Ogre::Real			m_fGradus;

    // Temporare
    MyGUI::WidgetPtr	_widget;
    MyGUI::ButtonPtr	_button;
	bool m_bExitGame;
private:
	static InGameState m_pInGameState;
};
#endif /* INGAMESTATE_H_ */
